package com.hongyuan.sellfitness.ui.find.view_mode;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.hongyuan.mvvmhabitx.binding.command.BindingCommand;
import com.hongyuan.mvvmhabitx.bus.RxBus;
import com.hongyuan.sellfitness.base.CustomViewModel;
import com.hongyuan.sellfitness.base.ItemViewModel;
import com.hongyuan.sellfitness.ui.find.beans.CircleBeans;

public class ChoseCricleRightItemViewModel extends ItemViewModel<CustomViewModel> {

    public ObservableField<CircleBeans.ListBean> entity = new ObservableField<>();

    public ChoseCricleRightItemViewModel(@NonNull CustomViewModel viewModel, CircleBeans.ListBean bean) {
        super(viewModel);
        entity.set(bean);
    }

    //去帖子详情
    public BindingCommand onClick = new BindingCommand(() -> {
        RxBus.getDefault().post(entity.get());
        viewModel.finish();
    });
}
